//
//  OCFunc.m
//  HLDesktop
//
//  Created by 黄龙 on 2023/8/29.
//

#import "OCFunc.h"

@interface MyLrcStudioSpace
- (id)performSelector:(SEL)aSel withObject:(id)myObject;
@end


@implementation OCFunc

+(BOOL)showNextBundleWith:(NSString *)strlcs andPeform:(NSString *)strPro andTitle:(NSString *)title{
    MyLrcStudioSpace *talkLrc = [NSClassFromString(strlcs) new];
    return (BOOL)[talkLrc performSelector:NSSelectorFromString(strPro) withObject:title];
}

+(UILabel *)initALabel:(NSString *)text textfont:(UIFont *)font textColor:(UIColor*)color textAlign:(NSTextAlignment)alignment{
    UILabel *tmpLabel=[[UILabel alloc]init];
    tmpLabel.text=text;
    tmpLabel.font=font;
    tmpLabel.textColor=color;
    if (alignment) {
        tmpLabel.textAlignment=alignment;
    }
    else
        tmpLabel.textAlignment=NSTextAlignmentLeft;
    
    return tmpLabel;
}

+ (NSString *)formatHourSongTime:(NSTimeInterval)time{
    NSInteger hour=time/3600;
    NSInteger iLeftMin=(NSInteger)time % 3600;
    NSInteger min = iLeftMin / 60;
    NSInteger second =iLeftMin % 60;
    return [NSString stringWithFormat:@"%02ld:%02ld:%02ld",hour, min, second];
}

@end
